package com.chenxi.vhr.bean.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author : zhangchenxi
 * @create : 2022-01-25
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {

    private Integer status;

    private String msg;

    private Object obj;

    public static Result ok() {
        return new Result(200, "", null);
    }
    public static Result ok(String msg) {
        return new Result(200, msg, null);
    }
    public static Result ok(String msg, Object obj) {
        return new Result(200, msg, obj);
    }

    public static Result error() {
        return new Result(500, "", null);
    }

    public static Result error(String msg) {
        return new Result(500, msg, null);
    }

    public static Result error(String msg, Object obj) {
        return new Result(500, msg, obj);
    }

}
